import http from '@/http'
import { GrounpParm, ZiTiParm, ZiTiType, OrderParm,GroupPointParm } from './MangeModel'
//获取团购管理列表
export const getListApi = (parm: GrounpParm) => {
	return http.post('/api/groupbuy/getList', parm)
}
// 自提点管理
export const getZiTiListApi = (parm: ZiTiParm) => {
	return http.post('/api/selfPriming/getList', parm)
}
//新增
export const insertApi = (parm: ZiTiType) => {
	return http.post('/api/selfPriming/insert', parm)
}
// 编辑
export const editApi = (parm: ZiTiType) => {
	return http.post('/api/selfPriming/edit', parm)
}
// 删除
export const delApi = (parm: any) => {
	return http.post('/api/selfPriming/del', parm)
}
/**
 * 获取订单管理列表
 */
export const getOrderListApi = (parm: OrderParm) => {
	return http.post('/api/orderClient/getOrderList', parm)
}
//获取订单条件
export const getSelectGroupListApi = () => {
	return http.get('/api/orderClient/getSelectGroupList')
}
 // 获取当前团购下的自提点
export const getGroupSelfPrimingApi = (parm: GroupPointParm) => {
	return http.post('/api/orderClient/getGroupSelfPriming', parm)
}
//判断是否是团长发布
export const checkOrganizerApi = (param: { groupbuy_id:unknown}) => {
	return http.post('/api/orderClient/checkOrganizer', param)
}

//获取订单付款参数
export const getPayInfoApi = (param:any) => {
	return http.get('/api/order/getPayInfo?order_no='+ param)
}